<%@ page language="java" contentType="text/html; charset=US-ASCII"
    pageEncoding="US-ASCII"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<%
	String taskId = request.getParameter("taskId");
%>
<div id="taskStatus-alert-container"></div>
<div class="panel panel-default" id="task_details">
  <div class="panel-heading">
    	<i class="fa fa-tasks"></i> 
	      	<a data-toggle="collapse" href="#collapseTaskDetails">
	      		Task Details
			</a>
	     <div class="pull-right">
	       <div class="btn-group">
	             <button type="button" class="btn btn-default btn-xs dropdown-toggle" data-toggle="dropdown">
	                 Actions
	                 <span class="caret"></span>
	             </button>
	             <ul class="dropdown-menu pull-right" role="menu">
	           	    <li><a  id="taskSatusSendAdminEmail"><i class="fa fa-envelope-o fa-fw"></i>Send Admin</a></li>
	               
	             </ul>
	         </div> 
	         
	         <button type="button" class="close" id="exitTaskDetails" aria-hidden="true">&times;</button>
	     </div>
  </div>
  <div id="collapseTaskDetails" class="panel-collapse collapse in">
  <div class="panel-body">
   <h3>Task Details</h3>
	   <form class="form-horizontal" role="form">
	   		<div class="row">
	   			<div class="col-lg-6">
	   				<div class="form-group">
					    <label class="col-md-6 control-label">Server Name:</label>
					    <div class="col-md-6">
					      <p class="form-control-static" id="taskStatus[0].serverName"></p>
					    </div>
				  	</div>
				  	<div class="form-group">
					    <label class="col-md-6 control-label">Task:</label>
					    <div class="col-md-6">
					      <p class="form-control-static" id="taskStatus[0].task"></p>
					    </div>
				  	</div>
				  	<div class="form-group">
					    <label class="col-md-6 control-label">Description:</label>
					    <div class="col-md-6">
					      <p class="form-control-static" id="taskStatus[0].comment"></p>
					    </div>
				  	</div>
	   			</div>
	   			<div class="col-lg-6">
		   				<div class="form-group">
					    <label class="col-md-6 control-label">Start Date:</label>
					    <div class="col-md-6">
					      <p class="form-control-static" id="taskStatus[0].startDate"></p>
					    </div>
					  	</div>
					  	<div class="form-group">
						    <label class="col-md-6 control-label">End Date:</label>
						    <div class="col-md-6">
						      <p class="form-control-static" id="taskStatus[0].endDate"></p>
						    </div>
					  	</div>
					  		<div class="form-group">
						    <label class="col-md-6 control-label">Status:</label>
						    <div class="col-md-6">
						      <p class="form-control-static" id="taskStatus[0].status"></p>
						    </div>
					  	</div>
	   			</div>
	   		</div>
		  		
			  	
		</form>
   		<ul class="nav nav-tabs" role="tablist">
		  <li class="active"><a href="#task_output" role="tab" data-toggle="tab">Output</a></li>
		  <li><a href="#task_error" role="tab" data-toggle="tab">Error</a></li>
		</ul>
		
		<!-- Tab panes -->
		<div class="tab-content">
		  <div class="tab-pane active" id="task_output">
		  	<pre id="taskStatus[0].output"></pre>
		  </div>
		  <div class="tab-pane" id="task_error">
		  	<pre id="taskStatus[0].error"></pre>
		  </div>
		</div>
  	</div>
  </div>
</div>

<script>
	 $(document).ready(function() {
	 	var taskId= "<%= taskId %>";
		uft.selectedTaskList[0]=taskId;
		uft.updateTaskDetails();
		$( "#exitTaskDetails" ).click(function(){
			uft.emptyDiv("task-output");
		})
		
		$( "#taskSatusSendAdminEmail" ).click(function(){
			uft.emailTaskDetails();
		})
	 
	 	
	 })
</script>